<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
登录成功
<button id="kk" onclick="sta()">进行单点登录</button>
<div id="tex">hhh</div>
<a href="/home" target="_blank">跳转</a>






</body>
<script>
    document.getElementById("tex").innerText=sessionStorage.getItem("zjhm")

function sta(){
    function run() {
        console.log("进入")
        var u=sessionStorage.getItem("zjhm")
        var m=sessionStorage.getItem("mm")
        console.log(u)
        console.log(m)

        var form= document.createElement("form");
        document.body.appendChild(form)
        form.method="POST"
        form.action="http://localhost:8088/login2"
        var username=document.createElement("input")
        username.type="hidden"
        username.name="username"
        username.value=u
        var password=document.createElement("password")
        password.type="hidden"
        password.name="password"
        password.value=m
        form.appendChild(username)
        form.appendChild(password)
        console.log("退出")
        form.submit();



    }
    setTimeout(run(),100)


}






</script>
</html>